package com.json.entity;

import java.util.List;

import org.w3c.dom.Element;
import org.w3c.dom.Node;

import com.dld.android.util.ReflectionFactory;

public class ShopDetailBean {
	private String shopid;
	private String logo;
	private String address;
	private String tel;
	private String shopname;
	private List<Image> images;
	private String shop_description;
	private List<DlDActivity> acs;

	private String x;
	private String y;

	public String getShopid() {
		return shopid;
	}

	public void setShopid(String shopid) {
		this.shopid = shopid;
	}
	
	public void setShopname(String shopname) {
		this.shopname = shopname;
	}
	public String getShopname() {
		return shopname;
	}

	public String getLogo() {
		return logo;
	}

	public void setLogo(String logo) {
		this.logo = logo;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public List<Image> getImages() {
		return images;
	}

	public void setImages(List<Image> images) {
		this.images = images;
	}

	public String getShop_description() {
		return shop_description;
	}

	public void setShop_description(String shop_description) {
		this.shop_description = shop_description;
	}

	public List<DlDActivity> getAcs() {
		return acs;
	}

	public void setAcs(List<DlDActivity> acs) {
		this.acs = acs;
	}

	public String getX() {
		return x;
	}

	public void setX(String x) {
		this.x = x;
	}

	public String getY() {
		return y;
	}

	public void setY(String y) {
		this.y = y;
	}

	public static ShopDetailBean fromElement(Element ele) throws Exception {
		ShopDetailBean sdb = ReflectionFactory.create(ele.getElementsByTagName(
				"result").item(0), ShopDetailBean.class);
		List<DlDActivity> lacs = DlDActivity.fromElemList(ele
				.getElementsByTagName("activity"));
		List<Image> limages = Image.fromElemList(ele
				.getElementsByTagName("image"));
		sdb.setAcs(lacs);
		sdb.setImages(limages);
		return sdb;
	}
}
